
// const { Sequelize, DataTypes } = require("sequelize");
const { STRING, INTEGER, LONGSTRING } = require('../types')

module.exports = (sequelize) => {
  const wrong = sequelize.define(
    'wrong',
    {// 在这里定义模型属性
      id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      stuId: { type: INTEGER }, // 学生
      questionId: { type: INTEGER }, // 问题id
      detail: { type: LONGSTRING }, // 详情
      type: { type: STRING }, // 类型
    }, 
    {
    tableName: "wrong",//直接提供表名
    timestamps: false
   }
  );
  return wrong
}
